package game.seungha;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Listener_SimpleButton implements OnClickListener 
{
	Activity mActivity;
	
	Listener_SimpleButton(Activity activity)
	{
		mActivity 	= activity;
	}
	
	@Override
	public void onClick(View v) 
	{
		Button button = (Button)v;
		
		procButton_Play(button);
		

	}
	
	protected void procButton_Play(Button button)
	{
		Activity ownActivity = (Activity)button.getContext();
		
		Intent intent = new Intent(ownActivity, Activity_Play.class);
		
		//Intent intent = new Intent(mActivity, Activity_Result.class);
		
		//button.get
		
		//Activity.
		MediaPlayer mediaPlayer	= (MediaPlayer)((Activity_Main)mActivity).mMediaPlayer;
		
		mediaPlayer.stop();
		mediaPlayer = MediaPlayer.create(mActivity, R.raw.game_start);
		mediaPlayer.start();
		
		
		intent.putExtra("TEST", 100);
		
		ownActivity.startActivity(intent);		
	}
	protected void procButton_ReStart(Button button)
	{
		
	}
	protected void procButton_Ranking(Button button)
	{
		
	}

}
